home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / clikbr15.zip / CLICKBAR.DOC < prev    next >
Text File  |  1993-01-19  |  44KB  |  1,050 lines

  1.  
  2.      Credits
  3.      ──────────────────────────────────────────────────────────────────────
  4.  
  5.      ClickBar, ClickDlg, and WynBtn were written by Dave Campbell.       
  6.  
  7.      The ClickBar toolkit was developed using the Borland C++ 3.0 Windows
  8.      Development package.
  9.  
  10.  
  11.      Copyright Notice
  12.      ──────────────────────────────────────────────────────────────────────
  13.  
  14.      Clickbar, ClickDlg, and WynBtn are Copyright 1992 by WynApse Software.
  15.      All rights are reserved.
  16.  
  17.      This document is Copyright 1992 by WynApse Software.
  18.      All rights are reserved.
  19.  
  20.  
  21.      Trademarks
  22.      ──────────────────────────────────────────────────────────────────────
  23.  
  24.      Clickbar, ClickDlg, and WynBtn are trademarks of WynApse Software.
  25.  
  26.      All trademarks and registered trademarks referenced within this
  27.      document are the property of their respective holders.
  28.  
  29.  
  30.      Warranty Disclaimer
  31.      ──────────────────────────────────────────────────────────────────────
  32.  
  33.      WYNAPSE SOFTWARE MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED,
  34.      INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY AND/OR
  35.      FITNESS FOR A PARTICULAR PURPOSE.
  36.  
  37.      WYNAPSE SOFTWARE DOES NOT ASSUME ANY LIABILITY FOR THE USE OF THIS
  38.      SOFTWARE BEYOND THE ORIGINAL PURCHASE PRICE OF THIS SOFTWARE.
  39.  
  40.      IN NO EVENT WILL WYNAPSE SOFTWARE BE LIABLE TO YOU FOR ANY ADDITIONAL
  41.      DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL
  42.      OR CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF, OR INABILITY TO USE,
  43.      THIS SOFTWARE AND ITS ACCOMPANYING DOCUMENTATION, EVEN IF WYNAPSE
  44.      SOFTWARE, OR ANY AGENT OF WYNAPSE SOFTWARE HAS BEEN ADVISED OF THE 
  45.      POSSIBILITY OF SUCH DAMAGES.
  46.  
  47.  
  48.      Table of Contents
  49.      ──────────────────────────────────────────────────────────────────────
  50.  
  51.      Installation. . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  52.         Extracting Files. . . . . . . . . . . . . . . . . . . . . . . .   1
  53.         Installing Files into Windows . . . . . . . . . . . . . . . . .   1
  54.  
  55.      Version 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  56.         Introduction . . . . . . . . . . . . . . . . . . . . . . . . .    2
  57.         ClickBar.DLL . . . . . . . . . . . . . . . . . . . . . . . . .    2
  58.         ClickDlg.DLL . . . . . . . . . . . . . . . . . . . . . . . . .    2
  59.         TestClik.EXE . . . . . . . . . . . . . . . . . . . . . . . . .    2
  60.         ClikTest.EXE . . . . . . . . . . . . . . . . . . . . . . . . .    2
  61.         Included Files . . . . . . . . . . . . . . . . . . . . . . . .    3
  62.  
  63.      Accessing ClickDlg. . . . . . . . . . . . . . . . . . . . . . . .    4 
  64.         Introduction . . . . . . . . . . . . . . . . . . . . . . . . .    4
  65.         .C Program Header. . . . . . . . . . . . . . . . . . . . . . .    4
  66.         .C Program WinMain . . . . . . . . . . . . . . . . . . . . . .    5
  67.            Loading DLLs. . . . . . . . . . . . . . . . . . . . . . . .    5
  68.            Far Procedure Address Assignment. . . . . . . . . . . . . .    6
  69.            DLL End User Registration . . . . . . . . . . . . . . . . .    7
  70.            ClickDlg Setup call . . . . . . . . . . . . . . . . . . . .    8
  71.            ClickDlg Execution. . . . . . . . . . . . . . . . . . . . .    8
  72.            Freeing DLLs. . . . . . . . . . . . . . . . . . . . . . . .    8
  73.         .C Program WndProc . . . . . . . . . . . . . . . . . . . . . .    8
  74.            WM_SIZE and WM_MOVE . . . . . . . . . . . . . . . . . . . .    8
  75.            WM_COMMAND. . . . . . . . . . . . . . . . . . . . . . . . .    9
  76.         .RC File . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  77.         .DLG File. . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  78.  
  79.      DLL bitmaps vs. binding bitmaps . . . . . . . . . . . . . . . . .   11
  80.         Button Profiles. . . . . . . . . . . . . . . . . . . . . . . .   11
  81.  
  82.      ClickBar and the Resource Workshop. . . . . . . . . . . . . . . .   12
  83.         Installing ClickBar.DLL. . . . . . . . . . . . . . . . . . . .   12
  84.         Using the custom controls. . . . . . . . . . . . . . . . . . .   12
  85.         Button Types . . . . . . . . . . . . . . . . . . . . . . . . .   13
  86.         Button ID. . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  87.         Background Color . . . . . . . . . . . . . . . . . . . . . . .   13
  88.  
  89.      User Registration . . . . . . . . . . . . . . . . . . . . . . . .   14
  90.         WYNAPSE.INI. . . . . . . . . . . . . . . . . . . . . . . . . .   15
  91.         End User Use . . . . . . . . . . . . . . . . . . . . . . . . .   16
  92.  
  93.      Windows 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  94.  
  95.      Borland C++ . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  96.  
  97.      Registration. . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  98.  
  99.      ClickBar 1.0 ORDER FORM . . . . . . . . . . . . . . . . . . . . .   18
  100.  
  101.      Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  102.  
  103.  
  104.      Installation
  105.      ──────────────────────────────────────────────────────────────────────
  106.  
  107.  
  108.         Extracting Files
  109.         ────────────────
  110.  
  111.      Build a "scratch" directory, preferably on a large RAM disk, that will
  112.      be used to temporarily extract the delivered ClickBar files.  For
  113.      example, 
  114.  
  115.           C> cd \ <return>
  116.           C> md scratch <return>
  117.           C> cd scratch <return>
  118.  
  119.      Copy the ClikBar1.ZIP file from the source diskette to the scratch
  120.      directory:
  121.  
  122.           C> copy <diskette name>:\clikbar1.ZIP <return>
  123.  
  124.      Execute Pkunzip to extract the two main files:
  125.  
  126.           C> PKUNZIP CLIKBAR1 <return>
  127.      
  128.      Read the Read.Me file for any last-minute additions:
  129.   
  130.           C> type read.me|more <return>
  131.  
  132.  
  133.         Installing Files into Windows
  134.         ─────────────────────────────
  135.  
  136.      Start Windows, and from the Program Manager screen, execute 
  137.  
  138.           "File" "Run" C:\SCRATCH\SETUP.  
  139.  
  140.      Setup will propose a directory in which to install Clickbar.  If the
  141.      proposed directory is unacceptable, change it as necessary, and press
  142.      OK.  Setup will install ClickBar, and build a screen group named
  143.      WynApse for the TestClik and ClikTest programs. This will also provide
  144.      a convenient group for any test programs constructed using the
  145.      toolbar.  
  146.      
  147.      When SETUP is finished, and you next return to DOS, remove all the files 
  148.      from the scratch directory, and delete the directory:
  149.  
  150.           C> cd \scratch <return>
  151.           C> del *.* <return>
  152.  
  153.      answer "Y" to the question about deleting all the files, then:
  154.  
  155.           C> cd \ <return>
  156.           C> rd scratch <return>
  157.  
  158.  
  159.      Version 1.0
  160.      ──────────────────────────────────────────────────────────────────────
  161.  
  162.  
  163.         Introduction
  164.         ────────────
  165.  
  166.      This document is the manual for ClickBar and ClickDlg.  These two tools
  167.      are built for Microsoft Windows developers to use in producing 
  168.      Windows applications with full-featured tool bars.
  169.  
  170.  
  171.         ClickBar.DLL
  172.         ────────────
  173.  
  174.      ClickBar v1.0 is delivered with 144 3-dimensional bitmapped buttons to 
  175.      be used in any combination to provide users an exciting toolbar concept
  176.      instead of the standard pull-down menus.  75 of the buttons are "bound
  177.      into" the dynamic link library CLICKBAR.DLL, and the remainder are
  178.      provided as bitmaps for the developer to bind into the application, if
  179.      desired.
  180.  
  181.      See the section entitled "DLL bitmaps vs. binding bitmaps" for 
  182.      information and instructions on the available options.
  183.  
  184.  
  185.         ClickDlg.DLL
  186.         ────────────
  187.  
  188.      ClickDlg is the dynamic link library that provides the toolbar 
  189.      interface itself to the user's application.  A straight-forward, 
  190.      40-line addition to an existing application will provide the user 
  191.      with a toolbar interface.  
  192.    
  193.  
  194.         TestClik.EXE
  195.         ────────────
  196.  
  197.      ClickBar is delivered with a demonstration, "TestClik.EXE".  The 
  198.      source code is included for TESTCLIK, and the section entitled
  199.      "Accessing ClickDlg" details the portions of code pertinent to
  200.      the use of ClickBar and ClickDlg.
  201.  
  202.  
  203.         ClikTest.EXE
  204.         ────────────
  205.  
  206.      ClickBar is delivered with "ClikTest.EXE", which is a full-screen
  207.      Windows application displaying all the buttons available from 
  208.      ClickBar.DLL, and from the binding of the delivered user-bindable
  209.      buttons.  
  210.  
  211.      CLIKTEST provides the developer with a display of the buttons to decide 
  212.      which ones to use in a particular application, and also displays the 
  213.      ID codes returned to the Windows application upon the button being 
  214.      pressed, for ease in program development.
  215.  
  216.  
  217.  
  218.         Included Files
  219.         ──────────────
  220.  
  221.      As released by WynApse SoftWare, ClikBar0.zip contains the following
  222.      files:
  223.  
  224.           Read.Me            Last minute notes, and installation
  225.                                 instructions for those in a hurry. 
  226.  
  227.           ClickBar.doc       This document
  228.  
  229.           ClickBar.DLL       The dynamic link library for the bitmapped
  230.                                 buttons
  231.  
  232.           ClickBar.H         The header file for ClickBar
  233.  
  234.           ClickDlg.DLL       The dynamic link library for the toolbar
  235.  
  236.           ClickDlg.H         The header file for ClickDlg
  237.  
  238.           ClikTest.EXE       Demo of all buttons
  239.           ClikTest.HLP       Help file for demo
  240.  
  241.           TestClik.ZIP       A complete demonstration of ClickBar:
  242.              TestClik.C      Source file
  243.              TestClik.RC     Resource file
  244.              TestClik.DLG    Dialog file
  245.              TestClik.DEF    Link definition file
  246.              TestClik.H      Include file
  247.              TestClik.ICO    Icon file
  248.              TestClik.MAK    Make file
  249.              TestClik.RTF    Help source
  250.              TestClik.HLP    Compiled Help
  251.              TestClik.HPJ    Help project file
  252.              HTestCli.MAK    Help Make file
  253.              TestClik.EXE    Compiled executable
  254.  
  255.           Bmps.ZIP           ZIP-compressed file of 69 bitmapped buttons:
  256.              Bmp.DOC         Explanation of source and naming conventions
  257.              bitmaps         The bitmaps themselves
  258.  
  259.           Setup.EXE          Microsoft Windows Setup program
  260.  
  261.           Setup.INF          Setup data file
  262.    
  263.           WynBtn.DLL         Three Dynamic Link Libraries necessary for 
  264.           BWCC.DLL              the executing of Setup and TestClik.
  265.           RWMeter.DLL
  266.  
  267.           Order.Doc          Three support documents for registration
  268.           Site.Doc              purposes.
  269.           License.Doc
  270.  
  271.  
  272.  
  273.      Accessing ClickDlg
  274.      ──────────────────────────────────────────────────────────────────────
  275.  
  276.  
  277.         Introduction
  278.         ────────────
  279.  
  280.      Modifications to a Windows Application to enable the use of ClickBar
  281.      fall into two major areas: modification of the .C file and modification
  282.      of the .DLG (or .RC) file.  
  283.  
  284.      Quickly, the .C file contains the code and hooks to allow the
  285.      Application to set up ClickDlg for the call to display, and then must
  286.      service the ID codes returned in the main Windows Procedure to perform
  287.      the functions related to the individual buttons.
  288.  
  289.      The .DLG (or .RC) file contains the declarations of the locations and
  290.      order of the buttons desired in the application.
  291.  
  292.      All references in the following sections to line numbers will
  293.      correspond to line numbers in TestClik.C, TestClik.RC, or TestClik.DLG
  294.      as delivered from WynApse SoftWare.  If the source files have been
  295.      modified, the user accepts the responsibility for those changes.
  296.  
  297.      Explanations of the use of another WynApse product, WynBtn will be
  298.      included in the descriptions.  WynBtn is a 3-Dimensional bitmapped
  299.      button DLL with buttons mapping into the standard IDOK, IDQUIT, etc.
  300.      buttons.
  301.  
  302.  
  303.         .C Program Header
  304.         ─────────────────
  305.  
  306.      Line 16 in TestClik.C contains an include necessary to use WynBtn:
  307.  
  308.           #include <wynbtn.h>
  309.  
  310.      The following two includes must be in the main program, and are located
  311.      at lines 17 and 18 in TestClik.C:
  312.  
  313.           #include <clickdlg.h>
  314.           #include <clickbar.h>
  315.  
  316.      The "<" and ">" denote that the ".H" files are located in the 'include'
  317.      subdirectory with other system ".H" files.  If the user prefers to have
  318.      the files local to the current compile module, change the lines to
  319.      read:
  320.  
  321.           #include "wynbtn.h"
  322.           #include "clickdlg.h"
  323.           #include "clickbar.h"
  324.  
  325.      Next at line numbers 38 and 39 are two sets of Far Procedure
  326.      declarations:
  327.  
  328.           FARPROC lpfnDisplayDlg, lpfnDlgMove, lpfnDlgPlus;
  329.           FARPROC lpfnWynBtnSetup, lpfnClickBarSetup;
  330.  
  331.      These FARPROC's will be assigned values shortly.
  332.  
  333.      
  334.         .C Program WinMain
  335.         ──────────────────
  336.  
  337.      Line number 66 and 67 in TestClik.C contain the following declarations
  338.      in WinMain:
  339.  
  340.           HANDLE      hLibWynBtn, hClickBar, hClickDlg, hBWCCDll;
  341.           FARPROC     lpfnDlgSetup;
  342.  
  343.      The first line declares HANDLES for DLLs that will be loaded during
  344.      WinMain.  The second line declares a FARPROC pointer for the setup
  345.      procedure contained inside ClickDlg.DLL.
  346.  
  347.      Following that, on lines 68 and 69, are two declarations for using 
  348.      global memory:
  349.  
  350.           GLOBALHANDLE    MyStructHandle;
  351.           FPWYNAPSESTRUCT MyStruct;
  352.  
  353.      FPWYNAPSESTRUCT is a structure defined in CLICKBAR.H, and to be used in
  354.      WinMain.  MyStruct is a structure of that type, and MyStructHandle will
  355.      contain a global memory handle to that structure.
  356.  
  357.  
  358.         ───────────────────────────────
  359.         .C Program WinMain Loading DLLs
  360.  
  361.      Lines 95 through 129 in TestClik.C contain four identical constructs
  362.      which constitute the loading of four dynamic link libraries:
  363.  
  364.           hLibWynBtn = LoadLibrary("WYNBTN.DLL");
  365.           if (hLibWynBtn < 32)
  366.              {
  367.              FreeLibrary(hLibWynBtn);
  368.              MessageBox(GetFocus(),
  369.                         "Dynamic Link Library WYNBTN.DLL must be present",
  370.                         szAppName, 
  371.                         MB_ICONEXCLAMATION | MB_OK);
  372.              return 0;
  373.              }
  374.  
  375.           hClickBar = LoadLibrary("CLICKBAR.DLL");
  376.           if (hClickBar < 32)
  377.              {
  378.              FreeLibrary(hClickBar);
  379.              MessageBox(GetFocus(),
  380.                         "Dynamic Link Library CLICKBAR.DLL must be present",
  381.                         szAppName, 
  382.                         MB_ICONEXCLAMATION | MB_OK);
  383.              return 0;
  384.              }
  385.  
  386.  
  387.  
  388.           hClickDlg = LoadLibrary("ClickDlg.DLL");
  389.           if (hClickDlg < 32)
  390.              {
  391.              FreeLibrary(hClickDlg)
  392.               MessageBox(GetFocus(),
  393.                         "Dynamic Link Library CLICKDLG.DLL must be present",
  394.                         szAppName, 
  395.                         MB_ICONEXCLAMATION | MB_OK);
  396.              return 0;
  397.               }
  398.  
  399.            hBWCCDll = LoadLibrary("BWCC.DLL");
  400.            if (hBWCCDll < 32)
  401.                {
  402.               FreeLibrary(hBWCCDll);
  403.                MessageBox(GetFocus(),
  404.                          "Dynamic Link Library BWCC.DLL must be present",
  405.                          szAppName, 
  406.                          MB_ICONEXCLAMATION | MB_OK);
  407.               return 0;
  408.             }
  409.  
  410.      The four constructs are identical with the exception of the DLL names.
  411.      In all cases, if the handle returned is less than 32, an error occurred,
  412.      and the application is aborted with a MessageBox.
  413.  
  414.         ───────────────────────────────────────────────────
  415.         .C Program WinMain Far Procedure Address Assignment
  416.  
  417.      Lines 131 through 136 in TestClik.C assign Procedure Addresses to the
  418.      FARPROCS declared in the header:
  419.  
  420.           lpfnDlgSetup    = GetProcAddress(hClickDlg,  "ClickBarDialogSetup");
  421.           lpfnDlgMove     = GetProcAddress(hClickDlg,  "ClickBarDialogMove");
  422.           lpfnDisplayDlg  = GetProcAddress(hClickDlg,  "ClickBarDialogProc");
  423.  
  424.           lpfnWynBtnSetup   = GetProcAddress(hLibWynBtn, "WynBtnSetup");
  425.           lpfnClickBarSetup = GetProcAddress(hClickBar,  "ClickBarSetup");
  426.  
  427.      The first three assign addresses for functions in ClickDlg.DLL, and the
  428.      second set assign addresses for functions contained in ClickBar.DLL. 
  429.      The five functions will be explained as they are used later on in this
  430.      document.
  431.      
  432.  
  433.  
  434.         ────────────────────────────────────────────
  435.         .C Program WinMain DLL End User Registration
  436.  
  437.      Lines 138 through 153 is the code necessary for developers to register
  438.      their copy of ClickBar (and WynBtn) with the DLLs, to keep their
  439.      customers from being annoyed by the shareware banner in ClickBar and
  440.      WynBtn:
  441.  
  442.      MyStructHandle = GlobalAlloc(GHND, sizeof(WYNAPSE_STRUCT));
  443.  
  444.      MyStruct = (FPWYNAPSESTRUCT)GlobalLock(MyStructHandle);
  445.         lstrcpy(MyStruct->RegName, (LPSTR)"Your Name");  /* WynBtn RegName */
  446.         MyStruct->RegNumber = 0;                       /* WynBtn RegNumber */
  447.      GlobalUnlock(MyStructHandle);
  448.  
  449.      (*lpfnWynBtnSetup)(MyStructHandle);
  450.  
  451.      MyStruct = (FPWYNAPSESTRUCT)GlobalLock(MyStructHandle);
  452.         lstrcpy(MyStruct->RegName, (LPSTR)"Your Name"); /* ClickBar RegName */
  453.         MyStruct->RegNumber = 0;                      /* ClickBar RegNumber */
  454.      GlobalUnlock(MyStructHandle);
  455.  
  456.      (*lpfnClickBarSetup)(MyStructHandle);
  457.  
  458.      GlobalFree(MyStructHandle);
  459.  
  460.      The first line Allocates Global memory for a structure called
  461.      WYNAPSE_STRUCT which is defined in ClickBar.H.  Following that is two
  462.      identical constructs, one to be executed for each DLL used.  In each
  463.      case, the global memory handle is locked for use, and the structure
  464.      filled with registration information, then unlocked, and the handle
  465.      passed to the setup function of the appropriate DLL.  
  466.  
  467.      Please be sure that in the line:
  468.         lstrcpy(MyStruct->RegName, (LPSTR)"Your Name");  /* WynBtn RegName */
  469.  
  470.      or the line:
  471.         lstrcpy(MyStruct->RegName, (LPSTR)"Your Name"); /* ClickBar RegName */
  472.  
  473.      you enter YOUR registered name between the quotes exactly as it appears
  474.      on your registration paper, or diskette.  Include blank spaces and
  475.      include upper- and lower-case as necessary.
  476.  
  477.      The two lines:
  478.         MyStruct->RegNumber = 0;                       /* WynBtn RegNumber */
  479.         MyStruct->RegNumber = 0;                      /* ClickBar RegNumber */
  480.  
  481.      must contain YOUR registration number(s) as returned on your
  482.      registration paper or diskette.
  483.  
  484.      When one or both setup calls are finished the global memory is freed by
  485.      the GlobalFree call.
  486.  
  487.  
  488.  
  489.         ──────────────────────────────────────
  490.         .C Program WinMain ClickDlg Setup call
  491.  
  492.      Line 180 contains the Setup call to ClickDlg to pass YOUR application's
  493.      window handle, and allow ClickDlg to perform its internal setups:
  494.  
  495.           (*lpfnDlgSetup)(hWndMain);
  496.  
  497.  
  498.         ─────────────────────────────────────
  499.         .C Program WinMain ClickDlg Execution
  500.  
  501.      Line 182 contains the line:
  502.  
  503.           hWndDlg = CreateDialog(hInst, 
  504.                                  "CLICK", 
  505.                                  hWndMain,
  506.                                  MakeProcInstance((*lpfnDisplayDlg), hInst));
  507.      
  508.      hInst is the instance handle of this copy of your Application.  "CLICK"
  509.      is the name of the toolbar as designed in <>.RC or <>.DLG.  
  510.  
  511.      Your application now has a full-function toolbar located just below the
  512.      title bar, or just below the menu, if there is a menu.  Version 1.0 of
  513.      ClickBar provides a toolbar that moves and sizes with your window, but
  514.      is static in its relative location to your window.  v2.0 of ClickBar
  515.      will allow static and dynamic placement of the toolbar.
  516.  
  517.  
  518.         ───────────────────────────────
  519.         .C Program WinMain Freeing DLLs
  520.  
  521.      Starting on line 215 is the code to free the DLLs after use:
  522.  
  523.           FreeLibrary(hLibWynBtn);
  524.           FreeLibrary(hClickBar);
  525.           FreeLibrary(hClickDlg);
  526.           FreeLibrary(hBWCCDll);
  527.  
  528.  
  529.         .C Program WndProc 
  530.         ──────────────────────────────────────────────────────────────────────
  531.  
  532.      The WndProc is where the majority of the run-time work is done by an
  533.      application.  That is also where the work is done for the toolbar.
  534.  
  535.  
  536.         ──────────────────────────────────────
  537.         .C Program WndProc WM_SIZE and WM_MOVE
  538.  
  539.      In addition to any sizing and moving done by your application, WndProc
  540.      must make the following calls to ClickDlg during a WM_SIZE or WM_MOVE
  541.      command:
  542.  
  543.                case WM_SIZE :
  544.                case WM_MOVE :
  545.                   (*lpfnDlgMove)();
  546.                   break;
  547.  
  548.      Found on lines 320 through 323 in TestClik, these are the only WM_SIZE
  549.      and WM_MOVE commands that are handled by TestClik.
  550.  
  551.  
  552.  
  553.         ─────────────────────────────
  554.         .C Program WndProc WM_COMMAND
  555.  
  556.      Starting on line 340 in TestClik.C are lines of the type:
  557.  
  558.                case IDXLARROW : 
  559.  
  560.      There must be a case for each ClickBar.DLL button used in the dialog. 
  561.      ClickDlg.DLL will send WM_COMMAND messages back to your application, 
  562.      one message for each button press.  
  563.  
  564.      If a combo box is inserted in the toolbar, the box can be written to
  565.      and polled as is any other combo box.  No WM_COMMAND message is sent
  566.      back to the application for a combo box change.
  567.  
  568.  
  569.      .RC File
  570.      ──────────────────────────────────────────────────────────────────────
  571.  
  572.      Line 16 of TestClik.RC shows the inclusion of the ".H" file as
  573.      discussed in the section entitled ".C Program Header":
  574.  
  575.           #include <clickbar.h>
  576.  
  577.      At this point, some personal preference may come into play.  We here at
  578.      WynApse SoftWare prefer to keep the dialog code separate from the
  579.      resource file, consequently we normally have both a ".RC" file and a
  580.      ".DLG" file, in the manner of TestClik.  Some programmers prefer to
  581.      have the dialog information contained in the ".RC" file, in which case
  582.      the discussion about ".DLG" files below would be directed to the ".RC"
  583.      file.  This document will refer to both.
  584.  
  585.      .DLG File
  586.      ──────────────────────────────────────────────────────────────────────
  587.  
  588.      Line 9 of TestClik.DLG contains:
  589.  
  590.           CONTROL "", IDOK, "WynButton", 
  591.                   BS_DEFPUSHBUTTON | WS_OVERLAPPED | WS_TABSTOP, 
  592.                   54, 147, 36, 24
  593.  
  594.      This defines the 3D-bitmapped OK button from WynBtn.DLL.
  595.  
  596.      Similarly "testclik",  starting on line 17 of TestClik.DLG contains an
  597.      IDOK, IDCANCEL, and IDHELP button from WynBtn.DLL.
  598.  
  599.      Lines 30 through 55 of TestClik.DLG contain the actual toolbar layout. 
  600.      The toolbar dialog is defined as Helvetica 8 to get the spacing
  601.      correct.
  602.  
  603.      The "BorShade" control from line 34:
  604.  
  605.               CONTROL "", 101, "BorShade", 1, 0, 0, 373, 16
  606.  
  607.      is from BWCC.DLL from Borland, and is loaded in TestClik.C.
  608.  
  609.  
  610.  
  611.      The remaining lines are all defining the buttons as layed out in
  612.      Microsoft Excel, as an example.  Other buttons may be inserted in this
  613.      text file, or the layout rearranged at will.  Toolbars may be
  614.      constructed in this manner, however the preferred method is through the
  615.      Resource Workshop, detailed in the section entitled "ClickBar and the
  616.      Resource Workshop".
  617.  
  618.  
  619.      DLL bitmaps vs. binding bitmaps
  620.      ──────────────────────────────────────────────────────────────────────
  621.  
  622.      ClickBar.DLL and ClickDlg.DLL will provide your application with 75
  623.      bitmap pairs.  The pairs are arranged such that an unpressed button has
  624.      one look to it and a pressed button actually looks pressed.
  625.  
  626.      If a user wishes to do so, other bitmaps may be "bound in" to the
  627.      application to produce an even more custom look and feel.  
  628.  
  629.      CLICKBAR.H contains the text vs. numerical mapping of the buttons. Note
  630.      that each definition has an even number associated with it, for example
  631.  
  632.                #define IDVFASTREV 44
  633.  
  634.      in this case, IDVFASTREV is the ID code for bitmap 44.  Bitmap 45 is
  635.      the bitmap displayed for a pressed IDVFASTREV.
  636.  
  637.      What this means to the developer is that to include a custom bitmap, a
  638.      pair of bitmaps must be bound into the application, one for the normal
  639.      button, and one for the pressed button.  The syntax is:
  640.  
  641.                1050 BITMAP <unpressed>.bmp
  642.                3051 BITMAP <pressed>.bmp
  643.  
  644.      the addition of 1000 and 3000 to the bitmap takes care of the
  645.      translation through ClickBar.DLL.
  646.  
  647.      Note that overlaying pre-existing numbers will cause the ClickBar.DLL
  648.      bitmaps to be overridden.  As an example, TestClik overrides each
  649.      bitmap used, to produce a toolbar that exactly matches Excel.
  650.  
  651.      69 bitmap pairs are included with ClickBar as examples from Microsoft
  652.      Word, Excel, and Borland's Resource Workshop.  Any other bitmaps may be
  653.      used with ClickDlg, as long as the "profile" of the button matches the
  654.      existing profiles as detailed in ClickBar.H.
  655.  
  656.  
  657.         Button Profiles
  658.         ───────────────
  659.  
  660.      ClickBar v1.0 contains 3 profiles.  These profiles are:
  661.  
  662.      1)  22x18 16 colors (similar to those in Microsoft Excel, or 
  663.                           Word for Windows lower row)
  664.  
  665.      2)  25x22 16 colors (similar to the upper row of Word for Windows)
  666.  
  667.      3)  24x24 16 colors (similar to those in Resource Workshop)
  668.  
  669.  
  670.  
  671.      Any user-designed button may be bound into the executable and called by
  672.      number from the application, as long as the profile matches one of the
  673.      above.  The number may be the same as one of the ID numbers defined in
  674.      ClickBar, or a number beyond those defined, to avoid "losing" a button
  675.      in the heat of debug.
  676.  
  677.      The scheme used to define buttons is as follows.  For each button on 
  678.      the screen, there is a pair defined in the DLL (or bound in).  In each 
  679.      case, the even-numbered bitmap is the normal button, as viewed prior to
  680.      being pressed, and the odd companion button is the pressed-in button.
  681.  
  682.      The buttons are declared as explained above in the section entitled
  683.      "DLL bitmaps vs. binding bitmaps".
  684.  
  685.  
  686.      ClickBar and the Resource Workshop
  687.      ──────────────────────────────────────────────────────────────────────
  688.  
  689.      ClickBar.DLL is fully-qualified as a custom control as defined by
  690.      Borland for the Borland Resource Workshop.  
  691.  
  692.         Installing ClickBar.DLL
  693.         ─────────────────────── 
  694.  
  695.      To install ClickBar.DLL as a custom control, first invoke the
  696.      Resource Workshop.  Then using the menu selections, get into the
  697.      Dialog Box editor.  The menu selections "Options", "Install control
  698.      library" will provide a dialog box into which the user must type the
  699.      path specification of a custom control, in this case "ClickBar.DLL."
  700.      For example, if ClickBar was setup with the default pathspec, then
  701.      ClickBar.DLL is located on the path
  702.  
  703.           C:\WINDOWS\CLICKBAR
  704.  
  705.      The location to type into the custom control box is then
  706.  
  707.           C:\WINDOWS\CLICKBAR\CLICKBAR.DLL
  708.  
  709.      Upon doing this, three custom control buttons appear on the edit
  710.      tool palette, labeled W1, W2 and W3.  These three correspond as
  711.      follows:
  712.  
  713.           Profile   Wn
  714.           ───────   ──
  715.            22x18    W1
  716.            24x24    W2
  717.            25x22    W3
  718.  
  719.         Using the custom controls
  720.         ───────────────────────── 
  721.  
  722.      Selecting one of the new controls is idential to selecting one of
  723.      the standard ones in the workshop.  A cursor is provided for placing
  724.      the button on the face of the toolbar.  Move the cursor to the
  725.      desired position on the dialog box, and click the left mouse
  726.      button.  This will place a null button in the position you
  727.      selected.  Double click on the button and a dialog box will appear
  728.      for selecting the button and the 'type' of the button.
  729.  
  730.  
  731.  
  732.              Button Types
  733.              ────────────
  734.  
  735.      The dialog box for the buttons contains radio buttons for 3 defined
  736.      button types.  The types are:  "click", "push", and "toggle".  For
  737.      version 1.0 of ClickBar, only two of the types are enabled: "click",
  738.      and "push".  
  739.  
  740.      "Push" buttons change to the pressed-in 3D look when the mouse is
  741.      clicked on the face of the button, and continue to stay pressed in
  742.      until another button is pressed.  A good example of this would be
  743.      the play and fast-forward buttons on a tape player.  If in play
  744.      mode, and fast-forward is pressed, the play button pops up.  
  745.  
  746.      "Click" buttons change to the pressed-in 3D look only when the mouse
  747.      is clicked, and then pop back out.  An example of this would be the
  748.      stop button on a tape player.  The stop button does not stay pressed
  749.      in, just causes an action to take place.
  750.  
  751.      "Toggle" buttons, when enabled, will cause buttons to stay pressed
  752.      in until another mouse click releases the button.
  753.  
  754.              Button ID
  755.              ─────────
  756.  
  757.      The Button ID identifies the button that is displayed in the
  758.      position.  The button IDs can be found in ClickBar.h, or by
  759.      executing the ClikTest.EXE demo.  Each button press causes a
  760.      distinct ID code to be sent to the application WndProc.  
  761.  
  762.      The control dialog box contains a 'combo box' control which has the
  763.      appearance of an edit box with a down-arrow to the right of it. 
  764.      Clicking the arrow will pull down a list box containing the ID codes
  765.      for all the buttons falling in the selected profile.  Clicking the
  766.      desired code will bring that ID to the main edit box.  Then clicking
  767.      OK will cause that button to be displayed in the dialog.  Double
  768.      clicking the ID will select the code, and OK in one stroke.
  769.  
  770.      After the buttons are placed in the dialog, double clicking the
  771.      button will bring up the control dialog to allow the type or ID to
  772.      be altered.  To change the profile, the button must be deleted, and
  773.      a new profile selected.
  774.  
  775.              Background Color
  776.              ────────────────
  777.  
  778.      For Borland C++ 2.0 or 3.0 users, the dialog box should be selected
  779.      as class "bordlg", and the Borland shade type used as a background
  780.      for the buttons.  Non-Borland users may compile as the example
  781.      TestClik is shown, and the BWCC.DLL Borland dynamic link library is
  782.      bound in at run-time.  
  783.  
  784.  
  785.  
  786.  
  787.      User Registration
  788.      ──────────────────────────────────────────────────────────────────────
  789.  
  790.      Registering ClickBar will provide the developer with a Registration
  791.      number that is keyed to the name requested on the registration form. 
  792.      The next time ClickBar is accessed after receiving the number from
  793.      WynApse, the user should select "Register" from the Shareware banner
  794.      dialog.  Another dialog is presented requesting name and
  795.      registration number.  Use the Tab key to proceed from the Name box
  796.      to the Registration Number box, then click OK.  This will cause
  797.      ClickBar.DLL to produce a file "WYNAPSE.INI" in the Windows root
  798.      directory.  
  799.  
  800.         WYNAPSE.INI
  801.         ───────────
  802.  
  803.      WYNAPSE.INI is a standard ".INI" file as used by most large Windows
  804.      Applications, and has the form:
  805.  
  806.           [WynBtn]
  807.           RegName=David Campbell
  808.           RegNumber=123
  809.  
  810.           [ClickBar]
  811.           RegName=David Campbell
  812.           RegNumber=456
  813.      
  814.      The .INI file is produced only when a valid name and number is
  815.      entered in the registration box.  Building a WYNAPSE.INI file
  816.      off-line and entering a non-registered name and number will produce
  817.      the shareware dialog box because the two do not match.  
  818.  
  819.      The only acceptable time to build am .INI file off-line is when an
  820.      application developer has registered ClickBar (or WynButton), and
  821.      has an application to deliver to an end user.  In this case, the
  822.      developer does not want the end-user to be annoyed by the WynApse
  823.      shareware banner.  This is where the End User Registration technique
  824.      discussed in the section entitled "DLL End User Registration" is
  825.      used.  An application developer would build a WYNAPSE.INI file
  826.      delivered with the application that is as follows:
  827.  
  828.           [WynBtn]
  829.           RegName=EndUserLicense
  830.           RegNumber=n
  831.  
  832.           [ClickBar]
  833.           RegName=EndUserLicense
  834.           RegNumber=n
  835.  
  836.      the 'n' above can be any number, because "RegName" is the only value
  837.      read.  For this to work, the developer must code his/her
  838.      registration into the source code of the application as explained in
  839.      the section entitled "DLL End User Registration".
  840.  
  841.  
  842.  
  843.         End User Use
  844.         ────────────
  845.  
  846.      The technique of using the .INI file to control the registration
  847.      message causes the shareware dialog to reappear if the end user
  848.      attempts to use the DLL outside the scope of the application with
  849.      which it was delivered.  Because of this, the developer should
  850.      mention the use of the WYNAPSE.INI file in the application manual. 
  851.      If this file is deleted, the shareware registration dialog will
  852.      appear, and the end-user may be confused or annoyed by this.  One
  853.      consideration may be to write the file to the hard disk as
  854.      read-only.
  855.  
  856.      To discuss concerns or other considerations in this area, please
  857.      contact WynApse SoftWare either by voice, or electronic mail.
  858.  
  859.  
  860.      Windows 3.1
  861.      ──────────────────────────────────────────────────────────────────────
  862.  
  863.      ClickBar, and WynButton are both Windows 3.0 and Windows 3.1
  864.      compatible.  Windows 3.1 is the preferred way to go with the speed
  865.      and Free System Resources considerations.
  866.  
  867.  
  868.      Borland C++
  869.      ──────────────────────────────────────────────────────────────────────
  870.  
  871.      ClickBar, and WynButton are both compatible with Borland C++ version
  872.      2.0 and Borland C++ 3.0.  When the update becomes available for
  873.      Borland C++ for Windows 3.1, compliance with the new compiler will
  874.      be attained.   
  875.  
  876.  
  877.  
  878.  
  879.      Registration
  880.      ──────────────────────────────────────────────────────────────────────
  881.  
  882.      Thank you for taking the time to evaluate ClickBar!
  883.  
  884.      ClickBar is provided at no charge for evaluation purposes only.  This
  885.      shareware version of ClickBar is the complete working version of the
  886.      program, not a crippled or demo copy.
  887.  
  888.      WynApse SoftWare hereby grants you a limited license to use this
  889.      software for evaluation purposes only for a period not to exceed thirty
  890.      (30) days.  If you intend to continue using this software (and/or its
  891.      documentation) after the thirty (30) day evaluation period, you MUST
  892.      make a registration payment to WynApse SoftWare.  Using this software
  893.      after the evaluation period has ended without registering is a
  894.      violation of the terms of this limited license.
  895.  
  896.      Please refer to ORDER.DOC, SITE.DOC, & LICENSE.DOC for quantity
  897.      discounts, site-license information, and separate order blank.
  898.  
  899.      You may register ClickBar using the accompanying order form.
  900.  
  901.      The $35.00 registration fee licenses one copy of the software for use
  902.      on one computer.  Additional sites, or additional computers on a local
  903.      area network, must be licensed separately.  Alternatively, site
  904.      licenses are available; for additional information, please call
  905.      1-602-863-0411.
  906.  
  907.      As a registered user, you will receive:
  908.  
  909.         o  The full retail package, including printed manual.
  910.  
  911.         o  The most current version of the ClickBar program.  We are always
  912.            improving our products, and registration ensures that you have the
  913.            latest version.
  914.  
  915.         o  Free technical support.
  916.  
  917.         o  Notification of significant upgrades to ClickBar, and upgrade to
  918.            the next significant version at a reduced rate.
  919.  
  920.         o  Special offers on other products from WynApse SoftWare.
  921.  
  922.  
  923.      Please feel free to contact us if you have any questions, comments, or
  924.      suggestions or require additional information.  Thank you!
  925.  
  926.           WynApse SoftWare              Orders:      1-602-863-0411
  927.           P.O. Box 86247                Information: 1-602-863-0411
  928.           Phoenix, AZ 85080-6247        CompuServe:  [72251, 445]
  929.           U.S.A.                        
  930.  
  931.  
  932.  
  933.                           ClickBar 1.0 ORDER FORM
  934.  
  935.      Remit to:   WynApse SoftWare              Orders:      1-602-863-0411
  936.                  P.O. Box 86247                Information: 1-602-863-0411
  937.                  Phoenix, AZ 85080-6247        CompuServe:  [72251, 445]
  938.                  U.S.A.                        
  939.  
  940.      ClickBar                                  Qty ____ @  $35.00  $_________
  941.  
  942.      AZ residents add 6.7% sales tax.                              $_________
  943.  
  944.      Inside U.S. & Canada add  $1.00 shipping per Product.         $_________
  945.  
  946.      Outside U.S. & Canada add $3.00 shipping per Product.         $_________
  947.  
  948.  
  949.                                                           Total    $_________
  950.  
  951.      Payment by:  Check (U.S. funds only, drawn on a U.S. bank)
  952.  
  953.      Name:    _____________________________________  Title: _______________
  954.  
  955.      Company: _____________________________________________________________
  956.  
  957.      Address: _____________________________________________________________
  958.  
  959.               _____________________________________________________________
  960.  
  961.               _____________________________________________________________
  962.  
  963.      Day Phone: ________________________  Evening: ________________________
  964.  
  965.      Disk format:  ( ) 5.25"  ( ) 3.5"
  966.  
  967.      Where did you get your copy of ClickBar? _____________________________
  968.  
  969.      Printed Name for Registration number__________________________________
  970.  
  971.  
  972.      Index
  973.      ──────────────────────────────────────────────────────────────────────
  974.  
  975.      .C Header . . . . . . . . . .   4                  - E -
  976.      .C WinMain. . . . . . . . . .   5     End User Registration . . . .  7
  977.      .DLG. . . . . . . . . . . . .   4     End User Use. . . . . . . . . 15
  978.      .DLG File . . . . . . . . . .  10     EndUserLicense. . . . . . . . 14
  979.      .INI. . . . . . . . . . .  14, 15     Evaluation. . . . . . . . . . 16
  980.      .RC . . . . . . . . . . . . .   4     Extracting Files. . . . . . .  1
  981.      .RC file  . . . . . . . . . .  10     
  982.      22x18 . . . . . . . . . . . .  11                  - F -
  983.      24x24 . . . . . . . . . . . .  11     Far Procedure . . . . . . . .  6
  984.      25x22 . . . . . . . . . . . .  11     FARPROC . . . . . . . . . . .  4
  985.                                            FPWYNAPSESTRUCT . . . . . . .  5
  986.                    - A -                   Free System Resources . . . . 15
  987.      Accessing ClickDlg  . . . . .   4     Freeing DLLs. . . . . . . . .  8
  988.                                            FreeLibrary . . . . . . . . .  8
  989.                    - B -
  990.      Background Color. . . . . . .  13                  - G -
  991.      Binding Bitmaps . . . . . . .  11     GetProcAddress. . . . . . . .  6
  992.      Bitmap pairs. . . . . . . . .  11     GlobalFree. . . . . . . . . .  7
  993.      Bordlg. . . . . . . . . . . .  13
  994.      Borland C++ . . . . . . .  13, 15                  - H -
  995.      Borland shade . . . . . . . .  13     Helvetica . . . . . . . . . . 10
  996.      BorShade. . . . . . . . . . .  10
  997.      Bound in. . . . . . . . . . .  12                  - I -
  998.      Button ID . . . . . . . . . .  13     ID Codes. . . . . . . . . . .  2
  999.      Button Profiles . . . . . . .  11     Included Files. . . . . . . .  3
  1000.      Button Types  . . . . . . . .  13     Installation. . . . . . . . .  1
  1001.      BWCC.DLL  . . . . . . . 6, 10, 13     Installing. . . . . . . . . .  1
  1002.  
  1003.                    - C -                                - L -
  1004.      Click . . . . . . . . . . . .  13     Loading DLLs. . . . . . . . .  5
  1005.      ClickBar. . . . . . .  14, 15, 16     LoadLibrary . . . . . . . . .  6
  1006.      ClickBar.DLL . . . . 2, 5, 12, 14     LpfnDlgMove . . . . . . . . .  8
  1007.      ClickBar.H . .4, 5, 7, 10, 11, 13
  1008.      ClickBarDialogMove. . . . . .   6                  - O -
  1009.      ClickBarDialogProc. . . . . .   6     Order blank . . . . . . . . . 16
  1010.      ClickBarDialogSetup . . . . .   6     Order Form. . . . . . . . . . 17
  1011.      ClickBarSetup . . . . . . . .   6     Overlaying bitmaps. . . . . . 11
  1012.      ClickDlg Execution  . . . . .   8
  1013.      ClickDlg Setup  . . . . . . .   8                  - P -
  1014.      ClickDlg.DLL. . . . . . . .  2, 6     Push. . . . . . . . . . . . . 13
  1015.      ClickDlg.H. . . . . . . . . .   4
  1016.      ClikBar0.ZIP. . . . . . . . .   3                  - R -
  1017.      ClikTest.EXE. . . . . . . . 2, 13     Register. . . . . . . . . . .  7
  1018.      Combo box . . . . . . . . . 9, 13     Registering . . . . . . . . . 14
  1019.      CONTROL . . . . . . . . . . .  10     Registration. . . . . . . . . 16
  1020.      Control dialog. . . . . . . .  13     Registration Number . . . . . 17
  1021.      CreateDialog. . . . . . . . .   8     RegName . . . . . . . . .  7, 14
  1022.      Custom bitmap . . . . . . . .  11     RegNumber . . . . . . . .  7, 14
  1023.      Custom Control. . . . . . . .  12     Resource Workshop . . . . 11, 12
  1024.                                            Screen group. . . . . . . . .  1
  1025.                    - D -
  1026.      Discounts . . . . . . . . . .  16                      - S -
  1027.      DLL bitmaps . . . . . . . . .  11     Setup . . . . . . . . . . . .  1
  1028.                                            Site licenses . . . . . . . . 16
  1029.  
  1030.  
  1031.  
  1032.                    - T -                                - W -
  1033.      TestClik.C. . . . . . . . . .  10     Windows . . . . . . . . . . .  1
  1034.      TestClik.DLG. . . . . . . . .  10     Windows 3.0 . . . . . . . . . 15
  1035.      TestClik.EXE  . . . . . . . .   2     Windows 3.1 . . . . . . . . . 15
  1036.      TestClik.RC . . . . . . . . .  10     WM_COMMAND. . . . . . . . . .  9
  1037.      Toggle. . . . . . . . . . . .  13     WM_MOVE . . . . . . . . . . .  8
  1038.                                            WM_SIZE . . . . . . . . . . .  8
  1039.                    - U -                   WndProc . . . . . . . . . . 8, 9
  1040.      User Registration . . . . . .  14     WYNAPSE.INI . . . . . . . 14, 15
  1041.                                            WYNAPSE_STRUCT. . . . . . . .  7
  1042.                    - V -                   WynBtn. . . . . . . . . . .4, 14
  1043.      Version 1.0 . . . . . .  2, 8, 17     WynBtn.H. . . . . . . . . . .  4
  1044.                                            WynBtnSetup . . . . . . . . .  6
  1045.                                            WynButton . . . . . . . . 10, 15
  1046.  
  1047.                                                         - Y -
  1048.                                            Your Name . . . . . . . . . .  7
  1049.                                            Your Registration . . . . . .  7
  1050.